/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.bicycle.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.ws.Response;

import com.alibaba.druid.util.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import com.jeesite.common.config.Global;
import com.jeesite.common.entity.Page;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.bicycle.entity.BicycleUser;
import com.jeesite.modules.bicycle.service.BicycleUserService;

import java.util.List;

import static com.sun.xml.internal.ws.api.message.Packet.Status.Response;

/**
 * BlueBike用户Controller
 * @author 谢宇燊
 * @version 2020-04-07
 */
@RestController
@RequestMapping(value = "/user")
@CrossOrigin
public class BicycleUserMobileController extends BaseController {

    @Autowired
    private BicycleUserService bicycleUserService;

    @RequestMapping(value = "/login" , method = RequestMethod.POST , produces = "application/json")

    public List<BicycleUser> login( @RequestBody String loginCode, @RequestBody String password) {
//        if (StringUtils.isEmpty(loginCode) == false && StringUtils.isEmpty(password) == false) {
//
//            return bicycleUserService.dologin(loginCode, password);
//        }
        return bicycleUserService.dologin(loginCode, password);
    }

}


